import * as THREE from 'three';

const geometry = new THREE.PlaneGeometry(200,20);

// 创建纹理加载器对象
const loaderTex = new THREE.TextureLoader();
const texture = loaderTex.load('./lujing.png');

const material = new THREE.MeshBasicMaterial({ 
    // 设置材质的颜色贴图
    map:texture,
})
const mesh = new THREE.Mesh(geometry, material);
mesh.rotation.x = -Math.PI/2;

texture.offset.x = 0.5; //uv坐标 U方向上的偏移
texture.wrapS = THREE.RepeatWrapping;//对应offste.x偏移

// texture.offset.y = -0.5 //Uv坐标 V方向上的偏移
// texture.wrapT = THREE.RepeatWrapping//对应offste.y偏移

export {mesh ,texture};